using Microsoft.Win32;
using System;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
namespace Easislides
{
	public class FrmAbout : Form
	{
		private IContainer components = null;
		private Button BtnSysInfo;
		private Button BtnOK;
		private RichTextBox lbleula;
		private Panel panel1;
		private Label label2;
		private LinkLabel linkLabel1;
		private TextBox lblRegDetails;
		private Label label3;
		private Label lblVersion;
		private Label lblCopyright;
		private Label label4;
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
			ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(FrmAbout));
			this.BtnSysInfo = new Button();
			this.BtnOK = new Button();
			this.lbleula = new RichTextBox();
			this.label2 = new Label();
			this.linkLabel1 = new LinkLabel();
			this.lblRegDetails = new TextBox();
			this.label3 = new Label();
			this.lblVersion = new Label();
			this.lblCopyright = new Label();
			this.panel1 = new Panel();
			this.label4 = new Label();
			base.SuspendLayout();
			this.BtnSysInfo.Location = new Point(226, 293);
			this.BtnSysInfo.Name = "BtnSysInfo";
			this.BtnSysInfo.Size = new Size(80, 24);
			this.BtnSysInfo.TabIndex = 1;
			this.BtnSysInfo.Text = "System Info";
			this.BtnSysInfo.Click += new EventHandler(this.BtnSysInfo_Click);
//			this.BtnOK.DialogResult = DialogResult.OK;
			this.BtnOK.Location = new Point(312, 293);
			this.BtnOK.Name = "BtnOK";
			this.BtnOK.Size = new Size(80, 24);
			this.BtnOK.TabIndex = 2;
			this.BtnOK.Text = "OK";
			this.BtnOK.Click += new EventHandler(this.BtnOK_Click);
			this.lbleula.BackColor = SystemColors.Window;
			this.lbleula.Location = new Point(12, 93);
			this.lbleula.Name = "lbleula";
			this.lbleula.ReadOnly = true;
			this.lbleula.Size = new Size(381, 162);
			this.lbleula.TabIndex = 3;
			this.lbleula.Text = "";
			this.lbleula.LinkClicked += new LinkClickedEventHandler(this.lbleula_LinkClicked);
			this.label2.Location = new Point(15, 63);
			this.label2.Name = "label2";
			this.label2.Size = new Size(378, 32);
			this.label2.TabIndex = 6;
			this.label2.Text = "Use of EasiSlides is subject to your acceptance of the following End User Licence Agreement (EULA):";
			this.linkLabel1.AutoSize = true;
			this.linkLabel1.Location = new Point(70, 40);
			this.linkLabel1.Name = "linkLabel1";
			this.linkLabel1.Size = new Size(133, 13);
			this.linkLabel1.TabIndex = 7;
			this.linkLabel1.TabStop = true;
			this.linkLabel1.Text = "http://www.easislides.com";
			this.linkLabel1.LinkClicked += new LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
			this.lblRegDetails.Location = new Point(154, 260);
			this.lblRegDetails.Name = "lblRegDetails";
			this.lblRegDetails.Size = new Size(238, 20);
			this.lblRegDetails.TabIndex = 0;
			this.label3.AutoSize = true;
			this.label3.Location = new Point(15, 263);
			this.label3.Name = "label3";
			this.label3.Size = new Size(136, 13);
			this.label3.TabIndex = 9;
			this.label3.Text = "Name Displayed at Startup:";
			this.lblVersion.AutoSize = true;
			this.lblVersion.Location = new Point(15, 282);
			this.lblVersion.Name = "lblVersion";
			this.lblVersion.Size = new Size(42, 13);
			this.lblVersion.TabIndex = 10;
			this.lblVersion.Text = "Version";
			this.lblCopyright.AutoSize = true;
			this.lblCopyright.Location = new Point(15, 301);
			this.lblCopyright.Name = "lblCopyright";
			this.lblCopyright.Size = new Size(51, 13);
			this.lblCopyright.TabIndex = 11;
			this.lblCopyright.Text = "Copyright";
//			this.panel1.BackgroundImage = (Image)componentResourceManager.GetObject("panel1.BackgroundImage");
			this.panel1.BackgroundImageLayout = ImageLayout.Stretch;
			this.panel1.BorderStyle = BorderStyle.Fixed3D;
			this.panel1.Location = new Point(12, 12);
			this.panel1.Name = "panel1";
			this.panel1.Size = new Size(46, 43);
			this.panel1.TabIndex = 4;
			this.label4.Location = new Point(70, 12);
			this.label4.Name = "label4";
			this.label4.Size = new Size(322, 28);
			this.label4.TabIndex = 13;
			this.label4.Text = "EasiSlides provides Christian Lyrics projection and publication for Christian Praise && Worship.";
			base.AutoScaleDimensions = new SizeF(6f, 13f);
//			base.AutoScaleMode = AutoScaleMode.Font;
			base.ClientSize = new Size(404, 331);
			base.Controls.Add(this.lblRegDetails);
			base.Controls.Add(this.linkLabel1);
			base.Controls.Add(this.panel1);
			base.Controls.Add(this.BtnSysInfo);
			base.Controls.Add(this.BtnOK);
			base.Controls.Add(this.lbleula);
			base.Controls.Add(this.label2);
			base.Controls.Add(this.label3);
			base.Controls.Add(this.lblVersion);
			base.Controls.Add(this.lblCopyright);
			base.Controls.Add(this.label4);
//			base.FormBorderStyle = FormBorderStyle.FixedDialog;
//			base.Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
			base.MaximizeBox = false;
			base.MinimizeBox = false;
			base.Name = "FrmAbout";
			base.StartPosition = FormStartPosition.CenterScreen;
			this.Text = "About EasiSlides";
			base.Load += new EventHandler(this.FrmAbout_Load);
			base.ResumeLayout(false);
			base.PerformLayout();
		}
		public FrmAbout()
		{
			this.InitializeComponent();
		}
		private void FrmAbout_Load(object sender, EventArgs e)
		{
			this.lblRegDetails.Text = gf.GetRegValue("config", "RegistrationUser", "");
			this.lblVersion.Text = "Software Version: 4.0.5";
			this.lblCopyright.Text = "Copyright " + '©'.ToString() + " 2003-2010 Wai Kuen Mo";
			this.lbleula.Text = gf.EULA;
			this.lbleula.SelectionStart = 0;
			this.lbleula.SelectionLength = 0;
		}
		private void BtnOK_Click(object sender, EventArgs e)
		{
			gf.UserString = gf.Trim(this.lblRegDetails.Text);
			gf.SaveRegValue("config", "RegistrationUser", gf.UserString);
		}
		private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
		{
			gf.RunProcess(this.linkLabel1.Text);
		}
		private void lbleula_LinkClicked(object sender, LinkClickedEventArgs e)
		{
			gf.RunProcess(e.LinkText);
		}
		private void BtnSysInfo_Click(object sender, EventArgs e)
		{
			string text = (string)Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Shared Tools\\MSINFO").GetValue("Path", "");
			if (File.Exists(text))
			{
				gf.RunProcess(text);
			}
		}
	}
}
